<?php global $isHome;
$isHome = true;
get_header(); ?>
<?php 
$myquery = $wp_query;
query_posts('cat=1&showposts=1');
the_post();
require('post.php');
?>

<div id="distractions" class="section">
<h4>Random Distractions</h4>
<a href="/category/links/" class="more">more...</a>
<!-- &nbsp; <a href="http://feeds.feedburner.com/TanTanDistractions"><img src="http://i.tantannoodles.com/images/feed/12x12.gif" width="12" height="12" title="Distractions feed" border="0" /></a>
-->
<br class="clear" />
<ul>
<?php
$myquery = $wp_query;
query_posts('cat=7&showposts=5');?>
<?if (have_posts()): ?>
<?while (have_posts()) : the_post(); ?>
<li><strong><?php the_title();?></strong> <?php the_content()?>
<?php comments_popup_link('#', '#', '#', 'comments', ''); ?>
</li>
<?endwhile;?>
<?php endif;?>
</ul> 
</div>

<div id="featured-music" class="section yui-gb">
<h4>Featured Music</h4>
<a href="/category/music-podcast/" class="more">more...</a>
<!-- &nbsp; <a href="http://feeds.feedburner.com/TanTanMusic" class="feed">Music Feed</a>
-->
<br class="clear" />
<?php query_posts('cat=30&showposts=3'); $first=false; ?>

  <?php while (have_posts()) : the_post(); 
  
    $enclosure = get_post_meta($post->ID, 'enclosure', true);
	$thumbnail = get_post_meta($post->ID, 'thumbnail', true);
	if (!$thumbnail) $thumbnail = get_stylesheet_directory_uri().'/images/itunes.gif';
    $infoClass = '';
    $infoHTML = '';
    if ($enclosure) {
        $mp3 = split("\n", $enclosure);
        if (!$mp3[2] || ($mp3[2] && ereg('audio',$mp3[2]))) {
            $infoHTML = '- Audio MP3, '.round($mp3[1] / 1048576, 1).' MB';
            $infoClass = 'audio';
        }
    }
  ?>	
<div class="show yui-u <?php echo (!$first ? ($first='first') : '');?>">
	<a href="<?php the_permalink();?>"><img src="<?php echo $thumbnail;?>" width="32" height="32" /></a>
   <a href="<?php the_permalink() ?>" class="<?=$infoClass?>"><?php the_title() ?></a>
</div>
  <?php endwhile;?>

</div>

<div id="toolkit-updates" class="section">
<h4>Toolkit Updates</h4>
<a href="/toolkit/" class="more">more...</a>
<!--  &nbsp; <a href="http://feeds.feedburner.com/TanTanToolkit" class="feed">Toolkit Feed</a>
-->
<br class="clear" />

<ul>
<?php $query = new WP_Query('cat=11&showposts=3');
while ($query->have_posts()) : $query->the_post();?>
    <li><strong><?php the_title(); ?></strong><small> - <?php the_time('M d Y'); ?> <a href="<?php the_permalink()?>" id="update-<?php the_id()?>">view update &raquo;</a></small>
    <?php /*<div id="desc-<?php the_id();?>" class="description"><?php the_content(); ?></div> */ ?>
    </li>
<?php endwhile; ?>
</ul>
</div>

<div id="home-adsense" class="section">
<h4>Advertisements</h4> <br class="clear" />
<div class="code"><script type="text/javascript"><!--
google_ad_client = "pub-3390402430226178";
/* 468x60, created 2/14/08, homepage, tantan2 */
google_ad_slot = "8767827973";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>
</div>
<?php /*
<div id="tt-older-posts">
<h4>In Case You Missed It</h4>
<div class="tt-entry">
    <ul class="tt-second-nav-alt-setup">
        <?for ($i=$max;$i<$count && have_posts();$i++): $post = $posts[$i]; the_post(); ?> 
        <li><a class="title" href="<?php the_permalink() ?>"><?php the_title(); ?></a> 
        <small><?php the_time('M d Y'); ?>, <a href="<?php comments_link() ?>" class="comments"><?php comments_number('No Comments', '1 Comment', '% Comments', '', 'Comments off'); ?></a></small><br />
        </li>
        <? endfor; ?>
        <li class="archive"><a href="/archives/">View the archives &gt;</a></li>
    </ul>

</div> <!-- /entry -->

</div> <!-- /older-posts -->
*/?>

<?php;
$wp_query = $myquery;
?>



<?php get_footer(); ?>
